package org.infodavid.common.model.criteria;

import java.io.Serializable;
import java.util.Collection;

/**
 * The Interface ISortCriteria.
 */
public interface ISortCriteria extends Serializable {

	/**
	 * The Interface IColumnOrder.
	 */
	interface IColumnOrder extends Serializable {

		/**
		 * Gets the column.
		 * @return the column
		 */
		String getColumn();

		/**
		 * Sets the column.
		 * @param value the new column
		 */
		void setColumn(String value);

		/**
		 * Checks if is ascending.
		 * @return true, if is ascending
		 */
		boolean isAscending();

		/**
		 * Sets the ascending.
		 * @param flag the new ascending
		 */
		void setAscending(boolean flag);
	}

	/**
	 * Adds the column order.
	 * @param column the column
	 * @param ascending the ascending
	 * @return the i column order
	 */
	IColumnOrder addColumnOrder(String column, boolean ascending);

	/**
	 * Removes the column order.
	 * @param column the column
	 * @return the i column order
	 */
	IColumnOrder removeColumnOrder(String column);

	/**
	 * Gets the columns ordering.
	 * @return the columns ordering
	 */
	Collection<IColumnOrder> getColumnsOrdering();
}
